<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <jsp:include page="../inc/meta.jsp"></jsp:include>
    <jsp:include page="../inc/easyui.jsp"></jsp:include>
    <script type="text/javascript" src="<%=request.getContextPath()%>/Content/js/validDate.js"></script>
  </head>
  
  <body class="easyui-layout" fit="true">
    <div region="north" border="false"  iconcls="icon-search" title="快速搜索" style="height: 110px;
        overflow: hidden">
        <form id="frmOperationLog" method="post" action="">
        <table class="search-form datagrid-toolbar" style="width: 100%; height: 84px; font-size:12px;padding-left: 10px">
            <tr>
                <td style="width: 80px;text-align: right;">
                    用户名：
                </td>
                <td style="width:150px" >
                    <input name="UserName" style="width: 150px;" />
                </td>
                <td style="width: 80px;text-align: right;">
                    内容：
                </td>
                <td >
                    <input name="Content" style="width: 150px;" />
                </td>
                
            </tr>
            <tr>
                <td style="width: 80px;text-align: right;">
                    操作时间：
                </td>
                <td colspan="3" >
                    <input name="operationTimeStart" class="easyui-datetimebox" editable="true" style="width: 196px;" validType="myDate"/>-<input
                        name="operationTimeEnd" class="easyui-datetimebox" editable="true" style="width: 196px;" validType="myDate"/>
                        <a class="easyui-linkbutton" iconcls="icon-search" href="javascript:doSearch();">
                        搜索</a><a class="easyui-linkbutton" iconcls="icon-cancel" onclick="clearSearch();" href="javascript:void(0);">清空</a>
                </td>
            </tr>
        </table>
        </form>
    </div>
        <div id="content" region="center" title="日志列表" style="overflow: hidden" >
        <table id="operationLogList" fit="true" border="false">
        </table>
    </div>
    <script type="text/javascript">
        var operationLogGrid;
       
        function clearSearch() {
            $('#frmOperationLog').form('clear');
        }
        function doSearch() {
            operationLogGrid.datagrid('load', {
                userName: $('#frmOperationLog input[name=UserName]').val(),
                content: $('#frmOperationLog input[name=Content]').val(),
                operationTimeStart: $('#frmOperationLog input[comboname=operationTimeStart]').datetimebox('getValue'),
                operationTimeEnd: $('#frmOperationLog input[comboname=operationTimeEnd]').datetimebox('getValue')
            });
        }
        function doChangeSystem() {
			doSearch();
        }
        $(function () {
            operationLogGrid = $('#operationLogList').datagrid({
                url: '<%=request.getContextPath()%>/audit/getLogList',
                rownumbers: true,
                idField: 'id',
                fitColumns: true,
                toolbar: '#toolbar',
                pageSize: 10,
                pagination: true,
                pageList: [10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
                frozenColumns: [[{
                    title: 'Id',
                    field: 'Id',
                    width: 50,
                    checkbox: true
                }]],
                columns: [[{
                    field: 'userName',
                    title: '用户名',
                    width: 100
                }, {
                    field: 'content',
                    title: '内容',
                    width: 200
                }, {
                    field: 'createDate',
                    title: '时间',
                    width: 120
                }]]
            });
        });
    </script>
</body>
</html>
